// index.js
// 获取应用实例
const app = getApp()

Page({
  data: {
    username:'',
    password:'',
    user:''
  },
  judgeUsername(e){
    console.log(e);
    this.setData({
      username:e.detail.value
    })
  },
  judgePassword(e){
    console.log(e);
    this.setData({
      password:e.detail.value
    })
  },
  judgeUser(e){
    console.log(e);
    this.setData({
      user:e.detail.value
    })
  },

  handleLogin(username,password,user){
    const result=wx.request({
      url:'http://192.168.31.45:3000/login',
      method:'POST',
      data:{
        username:this.data.username,
        password:this.data.password,
        user:this.data.user
      },
      success:(res)=>{
        console.log(res);
      }
    })
    // console.log(type);
  }

})
